<?php
namespace Plugin\Organization\Schema;

use Plugin\Organization\Model\RdOrganizeProjLine;
use Hyperf\Swagger\Annotation\Property;
use Hyperf\Swagger\Annotation\Schema;

/**
 * 项目表
 */
#[Schema(title: 'RdOrganizeProjLineSchema')]
class RdOrganizeProjLineSchema implements \JsonSerializable
{
    #[Property(property: 'id', title: '主键', type: 'bigint')]
    public string $id;

    #[Property(property: 'name', title: '项目名称', type: 'varchar')]
    public string $name;

    #[Property(property: 'zone_id', title: '所属区域', type: 'bigint')]
    public string $zone_id;

    #[Property(property: 'sort', title: '排序', type: 'int')]
    public string $sort;

    #[Property(property: 'status', title: '状态', type: 'tinyint')]
    public string $status;

    #[Property(property: 'line_arr', title: '项目线点数组', type: 'json')]
    public string $line_arr;

    #[Property(property: 'line_style', title: '线条样式', type: 'json')]
    public string $line_style;

    #[Property(property: 'created_by', title: '创建者', type: 'bigint')]
    public string $created_by;

    #[Property(property: 'updated_by', title: '更新者', type: 'bigint')]
    public string $updated_by;

    #[Property(property: 'created_at', title: 'created_at', type: 'timestamp')]
    public string $created_at;

    #[Property(property: 'updated_at', title: 'updated_at', type: 'timestamp')]
    public string $updated_at;

    #[Property(property: 'deleted_at', title: 'deleted_at', type: 'timestamp')]
    public string $deleted_at;

    #[Property(property: 'remark', title: '备注', type: 'varchar')]
    public string $remark;




    public function __construct(RdOrganizeProjLine $model)
    {
       $this->id = $model->id;
       $this->name = $model->name;
       $this->zone_id = $model->zone_id;
       $this->sort = $model->sort;
       $this->status = $model->status;
       $this->line_arr = $model->line_arr;
       $this->line_style = $model->line_style;
       $this->created_by = $model->created_by;
       $this->updated_by = $model->updated_by;
       $this->created_at = $model->created_at;
       $this->updated_at = $model->updated_at;
       $this->deleted_at = $model->deleted_at;
       $this->remark = $model->remark;

    }

    public function jsonSerialize(): array
    {
        return ['id' => $this->id ,'name' => $this->name ,'zone_id' => $this->zone_id ,'sort' => $this->sort ,'status' => $this->status ,'line_arr' => $this->line_arr ,'line_style' => $this->line_style ,'created_by' => $this->created_by ,'updated_by' => $this->updated_by ,'created_at' => $this->created_at ,'updated_at' => $this->updated_at ,'deleted_at' => $this->deleted_at ,'remark' => $this->remark];
    }
}